package interfaceDemo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-04-05
 * Time: 16:59
 */
public class Teacher implements Person{
    String name;
    int age;

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public void run() {
        System.out.println("老师在跑");
    }

    @Override
    public void eat() {

        System.out.println("老师在吃饭");
    }
}
